# -*- coding: utf-8 -*-
'''
proxy example: 'http://user:pass@127.0.0.1:3128/'
'''


'''
dianping restinfo redis ip db 
picmap : redis set key -> restid
'''


#request sleep time
SLEEPTIME = 0.5

#oss bukct
BUCKETDIANP = 'xms-dianping'
OSSKEYID = '1MhXEmb2I94AiEHT'
OSSKEYSECRET = 'PbRcLk7LDvhPiU5dJQ9Wy3qhaNsBhs'
OSSENDPOINT = 'http://oss-cn-hangzhou-internal.aliyuncs.com'

#gearman host
jobServerHost = ['10.47.122.50:7003']
StartServerCmd = 'gearmand -uroot -d -L 10.47.122.50 -p 7003';

#城市搜索信息存储 other spider db=0 ,dianp==db3
SEARCHINFO_REDIS = {'host':'10.47.124.254', 'port':6379, 'db':3}
SEARCHINFO_KEY = 'DIANP:SEARCHINFO_KEY'

#餐馆信息存储  weixin==db7 others spider==db2  dianp==db3
RESTINFO_REDIS = {'host':'10.46.65.170', 'port':6379, 'db':3}
RESTPIC_REDIS = {'host':'10.46.65.170', 'port':6379, 'db':3}

#餐馆信息KEY
RESTPICKEY = lambda x:'RESTID:' + x
RESTINFOKEY = lambda x:'RESTINFO:' + x
RESTREVIEWKEY = lambda x:'RESTREVIEW:' + x
RESTBILLBOADKEY = lambda x:'RESTBILLBOAD:' + x
#RESTUSERTHKKEY = lambda x:'RESTUSERTHK:' + x

#统计信息存储---餐馆列表id存储
SPIDERSENSUS_REDIS = {'host':'10.47.124.254', 'port':6379, 'db':3}
REST_LIST_KEY = 'DIANP:RESTLIST_KEY'
REST_LIST_YT_KEY = 'DIANP:RESTLIST_YT_KEY'
REST_SET_KEY = 'DIANP:RESTSET_KEY'
PROXIE_UPDATETIME_KEY = 'DIANP:PROXIE_UPDATETIME_KEY'

#任务信息
RESTNEW = 'RESTNEW'
RESTUPDATE = 'RESTUPDATE'
CHAINWARN = 'CHARNWARN'
TASKBLOCK = 1000

#CENSUS  key
RESTNEWADDINFO = 'RESTNEWADDINFO'
RESTNEWADDPIC = 'RESTNEWADDPIC'
RESTNEWADDREVIEW = 'RESTNEWADDREVIEW'
RESTUPDATEINFO = 'RESTUPDATEINFO'
RESTUPDATEPIC = 'RESTUPDATEPIC'
RESTUPDATEREVIEW = 'RESTUPDATEREVIEW'
RESTCLOSE = 'RESTCLOSE'


#log PATH
REST_NEW_CENSUS = 'CENSUSRESTNEW'
REST_INFO_UPDATE_CENSUS = 'CENSUSRESTINFOUPDATE'
REST_PIC_UPDATE_CENSUS = 'CENSUSRESTPICUPDATE'
LOG_PATH = '/home/maintainer/dianping/dianping/log'
OPENLOG = True

#check KEYs
RESTINFOCHECK_KEYS = ['shopName','altName','cusineId','secondCusineId','districtId','star','taste','environment','service','lngs','lats','chainId','avgPriceTitle','tel','openTime','crossRoad']

#proxie KEY
PROXIE_KEY= '/XX/XXX/XX'
